﻿
namespace Marmat.Forms.Views.Grid
{
    public class RowColEventArgs : GridEventArgs
    {

        private Column m_column;

        internal RowColEventArgs(BaseGrid gridControl, int rowHandle, Column Column) : base(gridControl)
        {
            this.m_column = Column;
            this._rowHandle = rowHandle;
        }

        /// <summary>
        /// 返回准备编辑的行
        /// </summary>
        public object Row
        {
            get => this.GridControl.GetRow(this._rowHandle);
        }

        /// <summary>
        /// 返回准备编辑的列
        /// </summary>
        public Column Column
        {
            get
            {
                return this.m_column;
            }
        }

        private int _rowHandle;
        /// <summary>
        /// 返回准备编辑的行号
        /// </summary>
        /// <returns></returns>
        public int RowHandle
        {
            get
            {
                return this._rowHandle;
            }
        }
    }
}